messageObj = new DHTML_modalMessage();
messageObj.setShadowOffset(10);
var input;

function displayPopup(url, _input) {
	input = _input;
	messageObj.setSource(url);
	messageObj.setCssClassMessageBox(false);
	messageObj.setSize(400,200);
	messageObj.setShadowDivVisible(true);
	messageObj.display();
	if(input.value != null)
		document.getElementById('emailfield').value = input.value;
}

function closePopup() {
	var theemail = document.getElementById('emailfield').value;
	input.value = theemail;
	messageObj.close();
}